$(function () {
	vm.getStudentList();
});

var vm = new Vue({
	el:'#mapp',
	data:{
		title: "",
		//导师列表
		bsnStudentList: {},
		pageParams: {
			limit: "500",
			page: "1"
		}
	},
	methods: {
		getStudentList: function(){
			$.ajax({
				type: "POST",
			    url: ajaxServerUrlG("bsnstudent/list"),
                contentType: "application/json",
			    data: JSON.stringify(vm.pageParams),
			    success: function(r){
			    	if(r.code === 0){
						vm.bsnStudentList = r.page.list;
					}else{
						alert(r.msg);
					}
				}
			});
		},
		gotoEdit: function(id) {
			location.href = "msStudentInfoEdit.html?id=" + id + "&title=学生信息";
		}
	},
	filters: {
		/*过滤并替换头像 */
		imgFilter: function (imgUrl, xingb) {
			// console.log(imgUrl);
			if (StringUtils.isNotEmpty(imgUrl)) {
				return imgUrl;
			}
			if (xingb == "男") {
				return "images/man@2x.png";
			} else {
				return "images/woman@2x.png";
			}
		}
	}
});